<html>
 <head>
  <meta charset="UTF-8">
 </head>
 <body>
  <h1 data-lake-id="lVRaC" id="lVRaC"><span data-lake-id="u1c10a3ba" id="u1c10a3ba">面试者背景</span></h1>
  <p data-lake-id="u9d5d45e6" id="u9d5d45e6"><br></p>
  <p data-lake-id="ua6a387a6" id="ua6a387a6"><span data-lake-id="ua639b966" id="ua639b966">985应届本科生，秋招中，最近在找工作，但是还没拿到满意的offer，自述主要技术栈：java后端，mysql，jvm，kafka</span></p>
  <h1 data-lake-id="u3Pu4" id="u3Pu4"><span data-lake-id="u268cc521" id="u268cc521">面试过程</span></h1>
  <blockquote data-lake-id="u9afe6761" id="u9afe6761" class="lake-alert lake-alert-warning">
   <p data-lake-id="ue066a78f" id="ue066a78f"><span data-lake-id="u64754b32" id="u64754b32">项目介绍一下，定时任务，采集数据，从哪个数据源采集数据。ES、kafka、</span></p>
   <p data-lake-id="ub323aff6" id="ub323aff6"><span data-lake-id="u40449c4c" id="u40449c4c">定时任务是用的开源框架，</span><span data-lake-id="ue48dedcd" id="ue48dedcd">E-job</span><span data-lake-id="u0d8d4cf9" id="u0d8d4cf9">，</span></p>
   <p data-lake-id="u72261f1a" id="u72261f1a"><span data-lake-id="ue5121d38" id="ue5121d38">预警模块的优化，线程池，批处理</span><span data-lake-id="u56ab5505" id="u56ab5505">-</span><span data-lake-id="u08a8b307" id="u08a8b307">》流处理，优化前和优化后的效果数据有吗？</span></p>
   <p data-lake-id="u5a779fb4" id="u5a779fb4"><span data-lake-id="uc2c22e3b" id="uc2c22e3b">之前</span><span data-lake-id="uc3a0d80a" id="uc3a0d80a">10w</span><span data-lake-id="u9cad427d" id="u9cad427d">条数据处理会崩溃的原因是什么？那你这个方案能解决的原因是什么？</span></p>
   <p data-lake-id="ub1a61c33" id="ub1a61c33"><span data-lake-id="ue2cea13e" id="ue2cea13e">线程池的原理介绍一下？</span><span data-lake-id="u3159029e" id="u3159029e">JAVA</span><span data-lake-id="ud4050365" id="ud4050365">中如何创建线程池？线程池有哪几种？线程数如何设置？核心线程数，最大线程数该该设置成多少该怎么定？</span><span data-lake-id="u1bd7cc7d" id="u1bd7cc7d">IO</span><span data-lake-id="ue8f1b31f" id="ue8f1b31f">密集、</span><span data-lake-id="u691e98ff" id="u691e98ff">CPU</span><span data-lake-id="ubc7b16c2" id="ubc7b16c2">密集？为什么</span><span data-lake-id="ue1ea2dc9" id="ue1ea2dc9">IO</span><span data-lake-id="ufed78a41" id="ufed78a41">密集型可以设置的多一些？</span></p>
   <p data-lake-id="u63d583e2" id="u63d583e2"><span data-lake-id="uc1c6ab26" id="uc1c6ab26">为什么不建议使用</span><span data-lake-id="uaffb81e9" id="uaffb81e9">Executors</span><span data-lake-id="uecc3b9c8" id="uecc3b9c8">创建线程池</span><span data-lake-id="uf659f2ea" id="uf659f2ea">?</span></p>
   <p data-lake-id="u1e50478c" id="u1e50478c"><span data-lake-id="u8f8352f2" id="u8f8352f2">创建线程有哪些方式？</span><span data-lake-id="u069ddc31" id="u069ddc31">Callable</span><span data-lake-id="u6e5b271a" id="u6e5b271a">可以单独用吗？</span><span data-lake-id="uc0214a40" id="uc0214a40">FutureTask</span></p>
   <p data-lake-id="u48444488" id="u48444488"><span data-lake-id="u439bbe6d" id="u439bbe6d">多线程的执行是同步的还是异步的？虚拟机会等线程执行完在</span><span data-lake-id="ub9669a8b" id="ub9669a8b">shutdown</span><span data-lake-id="u35c1f64e" id="u35c1f64e">吗？</span></p>
   <p data-lake-id="u4b437874" id="u4b437874"><span data-lake-id="u43552168" id="u43552168">Run</span><span data-lake-id="u5930e5a6" id="u5930e5a6">方法和</span><span data-lake-id="u86a52a3a" id="u86a52a3a">start</span><span data-lake-id="u5781e1f0" id="u5781e1f0">方法有啥区别？守护线程了解吗？守护线程和用户线程的区别？</span></p>
   <p data-lake-id="u7ac5c416" id="u7ac5c416"><span data-lake-id="u2858e48b" id="u2858e48b">GC</span><span data-lake-id="u88c0d8bb" id="u88c0d8bb">是有单独的线程吗？</span><span data-lake-id="ufe4cb8af" id="ufe4cb8af">STW</span></p>
   <p data-lake-id="u8468b14d" id="u8468b14d"><span data-lake-id="u01af3736" id="u01af3736">WAITING</span><span data-lake-id="u0896faf5" id="u0896faf5">和</span><span data-lake-id="u05e34bac" id="u05e34bac">TIMED_WAITING</span></p>
   <p data-lake-id="u9ac8a770" id="u9ac8a770"><span data-lake-id="u9b270c23" id="u9b270c23">什么是</span><span data-lake-id="u8f8f06ec" id="u8f8f06ec">CAS</span><span data-lake-id="uc1772976" id="uc1772976">？</span><span data-lake-id="u7adf3d4e" id="u7adf3d4e">CAS</span><span data-lake-id="u0ae10829" id="u0ae10829">都有哪些应用？乐观锁、自旋</span></p>
   <p data-lake-id="u6cc8fc54" id="u6cc8fc54"><span data-lake-id="u54e38d7c" id="u54e38d7c">Synchronized</span><span data-lake-id="u26bfb743" id="u26bfb743">的自旋是怎么实现的？代码上是如何实现的？</span></p>
   <p data-lake-id="uf206939b" id="uf206939b"><span data-lake-id="u574dbe3b" id="u574dbe3b">CAS</span><span data-lake-id="uc15a4672" id="uc15a4672">有什么问题吗？</span><span data-lake-id="u30206250" id="u30206250">ABA</span><span data-lake-id="u51094f43" id="u51094f43">问题、忙等待。通过自旋的角度思考一下</span><span data-lake-id="uae3b758e" id="uae3b758e">CAS</span><span data-lake-id="uaa3f343b" id="uaa3f343b">的问题？</span></p>
   <p data-lake-id="u45c33fd8" id="u45c33fd8"><span data-lake-id="u2aed11e8" id="u2aed11e8">JAVA</span><span data-lake-id="ue370afef" id="ue370afef">中的</span><span data-lake-id="u6aee6810" id="u6aee6810">CAS</span><span data-lake-id="u83d4083d" id="u83d4083d">怎么实现的？如何保证的原子性，</span></p>
   <p data-lake-id="u0bf9343e" id="u0bf9343e"><span data-lake-id="u7153f070" id="u7153f070">有了</span><span data-lake-id="u0442da70" id="u0442da70">synchornized</span><span data-lake-id="uba323aeb" id="uba323aeb">为什么还需要</span><span data-lake-id="u5f442fec" id="u5f442fec">volatile</span><span data-lake-id="ud0d05de2" id="ud0d05de2">？锁、</span></p>
   <p data-lake-id="u02596e7b" id="u02596e7b"><span data-lake-id="u304626fc" id="u304626fc">双重校验锁实现单例？</span><span data-lake-id="u1419b53b" id="u1419b53b">volatile</span><span data-lake-id="u832f6f26" id="u832f6f26">，</span></p>
   <p data-lake-id="ua3982c7f" id="ua3982c7f"><span data-lake-id="u0e84a9b5" id="u0e84a9b5">怎么实现的用了voaltile就会有内存屏障。</span></p>
   <p data-lake-id="udb3ee87e" id="udb3ee87e"><span data-lake-id="u970b8619" id="u970b8619">设计模式，用枚举实现单例有什么好处？为什么枚举可以防止单例被破坏？为什么枚举实现的单例就线程安全了？</span><span data-lake-id="uaf6f96cd" id="uaf6f96cd">static</span><span data-lake-id="u7f8881b9" id="u7f8881b9">修饰的对象特点？类加载的过程是线程安全的吗？为什么？</span></p>
   <p data-lake-id="u6ce59234" id="u6ce59234"><span data-lake-id="u5f86bdd6" id="u5f86bdd6">如何实现一个类加载器？为什么是</span><span data-lake-id="ube234cf1" id="ube234cf1">LoadClass</span><span data-lake-id="u572db350" id="u572db350">而不是</span><span data-lake-id="u7a67a4b6" id="u7a67a4b6">findClass</span><span data-lake-id="u5ae815e2" id="u5ae815e2">？</span></p>
   <p data-lake-id="udac6f2df" id="udac6f2df"><span data-lake-id="u54c1db21" id="u54c1db21">什么是聚簇索引？有什么避免回表的方式吗？下推、覆盖索引？</span></p>
  </blockquote>
  <h1 data-lake-id="FChSX" id="FChSX"><span data-lake-id="ubd560f90" id="ubd560f90">题目解析</span></h1>
  <p data-lake-id="u26e467c5" id="u26e467c5"><br></p>
  <blockquote data-lake-id="u6899ae75" id="u6899ae75" class="lake-alert lake-alert-color4">
   <p data-lake-id="ubafa47f5" id="ubafa47f5"><span data-lake-id="u9d7c0f6a" id="u9d7c0f6a">Q：预警模块的优化，线程池，批处理-》流处理，优化前和优化后的效果数据有吗？</span></p>
   <p data-lake-id="u48e057d1" id="u48e057d1"><span data-lake-id="u96af9957" id="u96af9957">之前</span><span data-lake-id="u4e00fe8a" id="u4e00fe8a">10w</span><span data-lake-id="ub2c0cb76" id="ub2c0cb76">条数据处理会崩溃的原因是什么？那你这个方案能解决的原因是什么？</span></p>
  </blockquote>
  <p data-lake-id="u540cf76b" id="u540cf76b"><br></p>
  <p data-lake-id="u8ad5b244" id="u8ad5b244"><span data-lake-id="ub8a060a0" id="ub8a060a0">这个问题，主要是考察面试者对于自己做过的项目，尤其是技术改造是不是真的做到了掌握，对于这一类问题，是大厂面试官非常喜欢问的一类问题。</span></p>
  <p data-lake-id="uac7c776f" id="uac7c776f"><span data-lake-id="u8127fb80" id="u8127fb80">​</span><br></p>
  <p data-lake-id="u39199219" id="u39199219"><span data-lake-id="u68865b26" id="u68865b26">所以，如果你在简历、或者面试的时候提到自己做了一些技术改造、技术选型、线上问题的解决等 ，一定要想清楚下面这几个问题：</span></p>
  <p data-lake-id="uaae726d3" id="uaae726d3"><span data-lake-id="uaac1b305" id="uaac1b305">​</span><br></p>
  <blockquote data-lake-id="ub45919c7" id="ub45919c7">
   <p data-lake-id="u36cc4d58" id="u36cc4d58"><span data-lake-id="uba68c01f" id="uba68c01f">本次技术改造中遇到的问题是什么？</span></p>
   <p data-lake-id="u8d50adbe" id="u8d50adbe"><span data-lake-id="u6cc0df78" id="u6cc0df78">问题是怎么来的？</span></p>
   <p data-lake-id="ub08939cd" id="ub08939cd"><span data-lake-id="ue1cf4327" id="ue1cf4327">你是如何解决的？</span></p>
   <p data-lake-id="u6abb1988" id="u6abb1988"><span data-lake-id="u38e40988" id="u38e40988">你的方案为什么可以解决这个问题？</span></p>
   <p data-lake-id="u18b2e9e3" id="u18b2e9e3"><span data-lake-id="u269e9389" id="u269e9389">还有没有其他的方案可以选择？</span></p>
   <p data-lake-id="u05f27634" id="u05f27634"><span data-lake-id="u5d92bee7" id="u5d92bee7">你的方案还有没有什么改进的空间？</span></p>
  </blockquote>
  <p data-lake-id="u1b3760bf" id="u1b3760bf"><br></p>
  <p data-lake-id="u8dbafc7f" id="u8dbafc7f"><span data-lake-id="u03e3702f" id="u03e3702f">切忌类似回答：不知道为什么这么做，主管（架构师、老师）让我这么做的，我来的时候就是这样的</span></p>
  <p data-lake-id="u6daef2d6" id="u6daef2d6"><span data-lake-id="uc2673fb1" id="uc2673fb1">​</span><br></p>
  <p data-lake-id="ubf99aed4" id="ubf99aed4"><span data-lake-id="ubbd4c6c3" id="ubbd4c6c3">​</span><br></p>
  <blockquote data-lake-id="ue5344688" id="ue5344688" class="lake-alert lake-alert-color4">
   <p data-lake-id="ubc911042" id="ubc911042"><span data-lake-id="u644fb209" id="u644fb209">Q：线程池的原理介绍一下？JAVA中如何创建线程池？线程池有哪几种？线程数如何设置？核心线程数，最大线程数该该设置成多少该怎么定？IO密集、CPU密集？为什么IO密集型可以设置的多一些？</span></p>
  </blockquote>
  <p data-lake-id="u1e9086d2" id="u1e9086d2"><br></p>
  <p data-lake-id="u61c534ae" id="u61c534ae"><span data-lake-id="ua6b115a2" id="ua6b115a2">如果在项目中用到线程池，一定要能清楚为什么要用、不用行不行、他的原理是什么、用了之后还会不会带来其他的问题？</span></p>
  <p data-lake-id="u23534f2a" id="u23534f2a"><br></p>
  <p data-lake-id="u2afd7e53" id="u2afd7e53"><span data-lake-id="u7fdf308e" id="u7fdf308e">关于线程池，请参考：</span><a href="https://www.yuque.com/hollis666/vhr2ge/fb5th6" target="_blank" data-lake-id="u18698509" id="u18698509"><span data-lake-id="uf3052848" id="uf3052848">https://www.yuque.com/hollis666/vhr2ge/fb5th6</span></a></p>
  <p data-lake-id="u92b55277" id="u92b55277"><span data-lake-id="u7b93943d" id="u7b93943d">线程数：</span><a href="https://www.yuque.com/hollis666/vhr2ge/zanzx4giay7gixf6" data-lake-id="u2e24215e" id="u2e24215e"><span data-lake-id="u494d5267" id="u494d5267">https://www.yuque.com/hollis666/vhr2ge/zanzx4giay7gixf6</span></a></p>
  <p data-lake-id="u16dd9316" id="u16dd9316"><span data-lake-id="uaede662d" id="uaede662d">​</span><br></p>
  <blockquote data-lake-id="uda91dd72" id="uda91dd72" class="lake-alert lake-alert-color4">
   <p data-lake-id="u1336aabc" id="u1336aabc"><span data-lake-id="u63368393" id="u63368393">创建线程有哪些方式？</span><span data-lake-id="u869f238d" id="u869f238d">Callable</span><span data-lake-id="u48aa8f03" id="u48aa8f03">可以单独用吗？</span><span data-lake-id="u65810c9c" id="u65810c9c">FutureTask</span></p>
  </blockquote>
  <p data-lake-id="udbcd2b9d" id="udbcd2b9d"><br></p>
  <p data-lake-id="uaa7b12fc" id="uaa7b12fc"><span data-lake-id="u13afc261" id="u13afc261">关于线程的创建方式，请参考：</span><a href="https://www.yuque.com/hollis666/vhr2ge/gmgb2a" target="_blank" data-lake-id="u9adbc98f" id="u9adbc98f"><span data-lake-id="ue082cec7" id="ue082cec7">https://www.yuque.com/hollis666/vhr2ge/gmgb2a</span></a></p>
  <p data-lake-id="u531d2542" id="u531d2542"><span data-lake-id="ucb7f626b" id="ucb7f626b">​</span><br></p>
  <blockquote data-lake-id="u40db62ea" id="u40db62ea" class="lake-alert lake-alert-color4">
   <p data-lake-id="u219eecc4" id="u219eecc4"><span data-lake-id="uae650392" id="uae650392">多线程的执行是同步的还是异步的？虚拟机会等线程执行完在</span><span data-lake-id="ud0a21e74" id="ud0a21e74">shutdown</span><span data-lake-id="uca3d4e94" id="uca3d4e94">吗？</span></p>
   <p data-lake-id="uf39d13ec" id="uf39d13ec"><span data-lake-id="ub9144bf0" id="ub9144bf0">Run</span><span data-lake-id="u5b86ee4c" id="u5b86ee4c">方法和</span><span data-lake-id="u06a0c3c8" id="u06a0c3c8">start</span><span data-lake-id="ubfbd838b" id="ubfbd838b">方法有啥区别？守护线程了解吗？守护线程和用户线程的区别？</span></p>
   <p data-lake-id="u4d0be6ae" id="u4d0be6ae"><span data-lake-id="u11bfe24b" id="u11bfe24b">GC</span><span data-lake-id="ueff00cca" id="ueff00cca">是有单独的线程吗？</span><span data-lake-id="ub821c77b" id="ub821c77b">STW</span></p>
   <p data-lake-id="u6abb75f2" id="u6abb75f2"><span data-lake-id="u69e89134" id="u69e89134">WAITING和TIMED_WAITING</span></p>
  </blockquote>
  <p data-lake-id="u1e2bcea9" id="u1e2bcea9"><br></p>
  <p data-lake-id="uc0a9ec35" id="uc0a9ec35"><span data-lake-id="ud5440b98" id="ud5440b98">run和start区别问题：</span><a href="https://www.yuque.com/hollis666/vhr2ge/bw9p42#t6Mya" target="_blank" data-lake-id="ue57e0047" id="ue57e0047"><span data-lake-id="ub9b45092" id="ub9b45092">https://www.yuque.com/hollis666/vhr2ge/bw9p42#t6Mya</span></a></p>
  <p data-lake-id="uaf6bfccf" id="uaf6bfccf"><span data-lake-id="u871d238a" id="u871d238a">守护线程&amp;虚拟机shutdown问题：</span><a href="https://www.yuque.com/hollis666/vhr2ge/dlg6vw" target="_blank" data-lake-id="u377338d2" id="u377338d2"><span data-lake-id="u8028b2b0" id="u8028b2b0">https://www.yuque.com/hollis666/vhr2ge/dlg6vw</span></a></p>
  <p data-lake-id="ua6afe7fe" id="ua6afe7fe"><span data-lake-id="u1da24596" id="u1da24596">waiting&amp;timed_waiting问题：</span><a href="https://www.yuque.com/hollis666/vhr2ge/rt6e6b#pvTzP" target="_blank" data-lake-id="u068eddae" id="u068eddae"><span data-lake-id="uc9f0c3f6" id="uc9f0c3f6">https://www.yuque.com/hollis666/vhr2ge/rt6e6b#pvTzP</span></a></p>
  <p data-lake-id="ufdee6388" id="ufdee6388"><span data-lake-id="u6b957997" id="u6b957997">​</span><br></p>
  <blockquote data-lake-id="u64589ac8" id="u64589ac8" class="lake-alert lake-alert-color4">
   <p data-lake-id="u66af87d1" id="u66af87d1"><span data-lake-id="uc72f61e5" id="uc72f61e5">什么是</span><span data-lake-id="ud740fde3" id="ud740fde3">CAS</span><span data-lake-id="u52b09b7c" id="u52b09b7c">？</span><span data-lake-id="u5ac68aab" id="u5ac68aab">CAS</span><span data-lake-id="u5abaeef5" id="u5abaeef5">都有哪些应用？乐观锁、自旋</span></p>
   <p data-lake-id="u89243979" id="u89243979"><span data-lake-id="ua164acc1" id="ua164acc1">Synchronized</span><span data-lake-id="u6d899048" id="u6d899048">的自旋是怎么实现的？代码上是如何实现的？</span></p>
   <p data-lake-id="u4ad222b5" id="u4ad222b5"><span data-lake-id="u75dd8e64" id="u75dd8e64">CAS</span><span data-lake-id="u81202f9b" id="u81202f9b">有什么问题吗？</span><span data-lake-id="ue146cea9" id="ue146cea9">ABA</span><span data-lake-id="ud4bf5f32" id="ud4bf5f32">问题、忙等待。通过自旋的角度思考一下</span><span data-lake-id="ufe4d6e0c" id="ufe4d6e0c">CAS</span><span data-lake-id="u9707097e" id="u9707097e">的问题？</span></p>
   <p data-lake-id="ubbf34b01" id="ubbf34b01"><span data-lake-id="uf293964d" id="uf293964d">JAVA</span><span data-lake-id="ue18efd69" id="ue18efd69">中的</span><span data-lake-id="ua30fd0dc" id="ua30fd0dc">CAS</span><span data-lake-id="u7661a018" id="u7661a018">怎么实现的？如何保证的原子性，</span></p>
  </blockquote>
  <p data-lake-id="u7f88740b" id="u7f88740b"><span data-lake-id="ude4d9843" id="ude4d9843">​</span><br></p>
  <p data-lake-id="uf4d227b5" id="uf4d227b5"><span data-lake-id="ue11526e9" id="ue11526e9">CAS的问题：</span><a href="https://www.yuque.com/hollis666/vhr2ge/cgckk3" target="_blank" data-lake-id="uad155bbd" id="uad155bbd"><span data-lake-id="ue855c263" id="ue855c263">https://www.yuque.com/hollis666/vhr2ge/cgckk3</span></a></p>
  <p data-lake-id="u8389baa9" id="u8389baa9"><span data-lake-id="u9c15d7dd" id="u9c15d7dd">CAS与自旋：</span><a href="https://www.yuque.com/hollis666/vhr2ge/cle1ag1rfu3uuwzg" data-lake-id="u31095f86" id="u31095f86"><span data-lake-id="u9d4bea34" id="u9d4bea34">https://www.yuque.com/hollis666/vhr2ge/cle1ag1rfu3uuwzg</span></a></p>
  <p data-lake-id="ua2b3f860" id="ua2b3f860"><span data-lake-id="u8d79a9ca" id="u8d79a9ca">CAS的实现：</span><a href="https://www.yuque.com/hollis666/vhr2ge/ed72dt8guaf4fvn8" data-lake-id="ua2ba01f7" id="ua2ba01f7"><span data-lake-id="u8027239e" id="u8027239e">https://www.yuque.com/hollis666/vhr2ge/ed72dt8guaf4fvn8</span></a></p>
  <p data-lake-id="ub1d39c6b" id="ub1d39c6b"><span data-lake-id="u49ff047a" id="u49ff047a">​</span><br></p>
  <blockquote data-lake-id="ua26e26e2" id="ua26e26e2" class="lake-alert lake-alert-color4">
   <p data-lake-id="u0c40cdc2" id="u0c40cdc2"><span data-lake-id="ubeb77aec" id="ubeb77aec">有了</span><span data-lake-id="u15c09512" id="u15c09512">synchornized</span><span data-lake-id="ud875c87b" id="ud875c87b">为什么还需要</span><span data-lake-id="uad9a95bc" id="uad9a95bc">volatile</span><span data-lake-id="uc8e41341" id="uc8e41341">？锁、</span></p>
   <p data-lake-id="u1cdf110d" id="u1cdf110d"><span data-lake-id="u75932457" id="u75932457">双重校验锁实现单例？</span><span data-lake-id="ud284a003" id="ud284a003">volatile</span><span data-lake-id="ue2501b4b" id="ue2501b4b">，</span></p>
   <p data-lake-id="u7a50cc65" id="u7a50cc65"><span data-lake-id="u175b2653" id="u175b2653">怎么实现的用了voaltile就会有内存屏障。</span></p>
  </blockquote>
  <p data-lake-id="ua11bd4f6" id="ua11bd4f6"><br></p>
  <p data-lake-id="u6b9c4917" id="u6b9c4917"><span data-lake-id="u205a09c7" id="u205a09c7">有了sync为什么还需要volatile： </span><a href="https://www.yuque.com/hollis666/vhr2ge/nl3dfw" target="_blank" data-lake-id="u1df30b0b" id="u1df30b0b"><span data-lake-id="uda711aab" id="uda711aab">https://www.yuque.com/hollis666/vhr2ge/nl3dfw</span></a></p>
  <p data-lake-id="u66643bcf" id="u66643bcf"><span data-lake-id="u5ca979cf" id="u5ca979cf">内存屏障：</span><a href="https://www.yuque.com/hollis666/vhr2ge/aylaul#rNo8M" target="_blank" data-lake-id="u741ba1f4" id="u741ba1f4"><span data-lake-id="ub1910ee3" id="ub1910ee3">https://www.yuque.com/hollis666/vhr2ge/aylaul#rNo8M</span></a></p>
  <p data-lake-id="ude0d1431" id="ude0d1431"><span data-lake-id="ubd2835e3" id="ubd2835e3">​</span><br></p>
  <blockquote data-lake-id="u6453830c" id="u6453830c" class="lake-alert lake-alert-color4">
   <p data-lake-id="uc48d5c57" id="uc48d5c57"><span data-lake-id="uc3e059c3" id="uc3e059c3">设计模式，用枚举实现单例有什么好处？为什么枚举可以防止单例被破坏？为什么枚举实现的单例就线程安全了？</span><span data-lake-id="u714c5f4a" id="u714c5f4a">static</span><span data-lake-id="u8e2b43a9" id="u8e2b43a9">修饰的对象特点？类加载的过程是线程安全的吗？为什么？</span></p>
  </blockquote>
  <p data-lake-id="u78ab42c7" id="u78ab42c7"><span data-lake-id="u91746451" id="u91746451">​</span><br></p>
  <p data-lake-id="u421ca84c" id="u421ca84c"><span data-lake-id="uec094f87" id="uec094f87">枚举单例的好处：</span><a href="https://www.yuque.com/hollis666/vhr2ge/if7kxl" target="_blank" data-lake-id="ud502cdf4" id="ud502cdf4"><span data-lake-id="ua1fe57fc" id="ua1fe57fc">https://www.yuque.com/hollis666/vhr2ge/if7kxl</span></a></p>
  <p data-lake-id="u14bb3801" id="u14bb3801"><br></p>
  <blockquote data-lake-id="udfd2088a" id="udfd2088a" class="lake-alert lake-alert-color4">
   <p data-lake-id="ue249a62a" id="ue249a62a"><span data-lake-id="u299c8c5e" id="u299c8c5e">如何实现一个类加载器？为什么是LoadClass而不是findClass？</span></p>
  </blockquote>
  <p data-lake-id="u172e521b" id="u172e521b"><br></p>
  <p data-lake-id="u51372a54" id="u51372a54"><span data-lake-id="u6f62bffb" id="u6f62bffb">要想实现一个类加载器，可以继承ClassLoader类，并重写其中的loadClass或者findClass方法，如果想要遵循双亲委派的原则，则直接重写findClass就行了。如果想破坏双亲委派，则重写loadClass方法。</span></p>
  <p data-lake-id="u69c24e06" id="u69c24e06"><br></p>
  <blockquote data-lake-id="u6945682b" id="u6945682b" class="lake-alert lake-alert-color4">
   <p data-lake-id="u2958a291" id="u2958a291"><span data-lake-id="u4c6f122e" id="u4c6f122e">什么是聚簇索引？有什么避免回表的方式吗？下推、覆盖索引？</span></p>
  </blockquote>
  <p data-lake-id="u1124b01a" id="u1124b01a"><span data-lake-id="u956a72e1" id="u956a72e1">​</span><br></p>
  <p data-lake-id="u68e2a8a4" id="u68e2a8a4"><span data-lake-id="u0d30b8e6" id="u0d30b8e6">聚簇索引：</span><a href="https://www.yuque.com/hollis666/vhr2ge/hogrm3" target="_blank" data-lake-id="u51362ebb" id="u51362ebb"><span data-lake-id="ud80c0f33" id="ud80c0f33">https://www.yuque.com/hollis666/vhr2ge/hogrm3</span></a></p>
  <p data-lake-id="u8e08bb92" id="u8e08bb92"><span data-lake-id="u000dc99c" id="u000dc99c">回表、索引下推、覆盖索引：</span><a href="https://www.yuque.com/hollis666/vhr2ge/vr22wd" target="_blank" data-lake-id="u7da6eb0e" id="u7da6eb0e"><span data-lake-id="u173eb5d3" id="u173eb5d3">https://www.yuque.com/hollis666/vhr2ge/vr22wd</span></a></p>
 </body>
</html>